import request from '../../request/index'
const state = {
    Goods: []
}
const getters = {

}
const mutations = {
    setData(state, data) {
        state.Goods = data
    }
}
const actions = {
    async GetGdata(store,data) {
        let res = await request({
            url: '/GetGdata',
            method: 'GET',
            params: {data}
        }).then(res => {
            store.commit('setData', res)
            return res
        })
        return res
    },
    async cgoodsstate(store,data){
        let res = await request({
            url: '/cgoodsstate',
            method: 'GET',
            params: {data}
        }).then(res => {
            return res
        })
        return res
    },
    async goodsdel(store,data){
        let res = await request({
            url: '/goodsdel',
            method: 'GET',
            params: {data}
        }).then(res => {
            return res
        })
        return res
    },
    async addgoods(store,data){
        let res = await request({
            url: '/addgoods',
            method: 'GET',
            params: {data}
        }).then(res => {
            return res
        })
        return res
    },
    async goodschange(store,data){
        let res = await request({
            url: '/goodschange',
            method: 'GET',
            params: {data}
        }).then(res => {
            return res
        })
        return res
    },
    async orderdata(store,data){
        let res = await request({
            url: '/orderdata',
            method: 'GET',
            params: {data}
        }).then(res => {
            return res
        })
        return res
    }
}
export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
}